home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 25 / CU Amiga Magazine's Super CD-ROM 25 (1998)(EMAP Images)(GB)(Track 1 of 2)[!][issue 1998-08].iso / CUCD / Magazine / C_Tutorial / Part-13 / PatchLib / source / WaitRemovePatch.c < prev   
Encoding:
C/C++ Source or Header  |  1997-05-01  |  1.5 KB  |  64 lines

  1. /*
  2. **    patch.library
  3. **
  4. **    Copyright © 1993-1997 by Stefan Fuchs
  5. **        Freely distributable.
  6. */
  7.  
  8. #ifndef _PATCH_INCLUDES_H
  9. #include "patch_includes.h"
  10. #endif
  11.  
  12.  
  13. /****** patch.library/WaitRemovePatch ***************************************
  14. *
  15. *   NAME
  16. *        WaitRemovePatch -- Waits until it is possible to remove a patch.
  17. *
  18. *   SYNOPSIS
  19. *        Error = WaitRemovePatch( patch )
  20. *        D0                       A0
  21. *
  22. *        ULONG Error WaitRemovePatch( struct Patch * );
  23. *
  24. *   FUNCTION
  25. *        This function is obsolete from V2 on, use RemovePatchTags() instead.
  26. *        It effectively calls the new function
  27. *        RemovePatchTags(patch,  PATT_TimeOut, 0x7fffffff,
  28. *                                PATT_DelayedExpunge, FALSE,
  29. *                                TAG_DONE)
  30. *
  31. *   INPUTS
  32. *        patch = pointer to the patch structure or NULL for no action
  33. *
  34. *   RESULT
  35. *        Error = errorcode as defined in patch.h.
  36. *                (for more information see RemovePatchTags() )
  37. *
  38. *   NOTES
  39. *
  40. *   BUGS (?)
  41. *        This function will never return, if the patched library function
  42. *        crashed for some reason.
  43. *
  44. *   SEE ALSO
  45. *        RemovePatchTags()
  46. *
  47. ******************************************************************************
  48. *
  49. */
  50.  
  51. ULONG LIBFUNC WaitRemovePatch( REGA0 struct Patch *patch GNUC_REGA0)
  52. {
  53. struct TagItem taglist[3];
  54.     taglist[0].ti_Tag = PATT_TimeOut;
  55.     taglist[0].ti_Data = 0x7fffffff;
  56.  
  57.     taglist[1].ti_Tag = PATT_DelayedExpunge;
  58.     taglist[1].ti_Data = 0L;
  59.  
  60.     taglist[2].ti_Tag = TAG_DONE;
  61.  
  62.     return(RemovePatchTagsA(patch, taglist));
  63. }
  64.